Progress Functions
Compressors and decompressors call progress functions to report on their progress in the current operation. When a component calls your progress function, it supplies you with a number that indicates the completion percentage. This fixed-point value may range from 0.0 through 1.0. Your program can cause the component to terminate the current operation by returning a result code ofcodecAbortErr
.The Image Compression Manager calls your progress function only during long operations, and it does not call your function more than 30 times per second.
The
ProgressProcPtr
data type defines a pointer to a progress function. You assign a progress function to an image or a sequence by passing a pointer to a structure that identifies the progress function to the appropriate function.
/* progress function structure */ typedef struct ProgressProcRecord ProgressProcRecord; typedef ProgressProcRecord *ProgressProcRecordPtr;The progress function structure contains the following fields:
struct ProgressProcRecord { ProgressProcPtr progressProc; /* ptr to progress function */ long progressRefCon;/* reference constant */ };
Field Description
progressProc
- Contains a pointer to your progress function.
progressRefCon
Contains a reference constant for use by your progress function.
Subtopics
- MyProgressProc